<template>
  <div>
    {{ name }}
    <slot :user="user"></slot>
    <div>{{ model }}</div>
    {{ count }}
    <button @click="">增加</button>
  </div>
</template>
<script setup lang="ts">
import { ref, computed, inject } from "vue";
import { useAppStore } from "@/stores/index";
import { storeToRefs } from "pinia";

const appStore = useAppStore();
const count = inject("count");
// const name = computed(() => appStore.name);
const { name } = storeToRefs(appStore);
const model = defineModel();
const user = ref({ name: "张三" });
const props = defineProps({
  msg: String,
});
</script>
